package com.ffcs.cn.action.scene;

import com.supermap.desktop.core.Application;
import com.supermap.desktop.core.Interface.IBaseItem;
import com.supermap.desktop.core.Interface.IFormScene;
import com.supermap.desktop.core.enums.WindowType;
import com.supermap.desktop.core.implement.CtrlAction;
import com.supermap.desktop.core.utilties.FormUtilities;
import com.ffcs.cn.DevelopProperties;

/**
 * 打开空白场景
 *
  */
public class CtrlActionOpenBlankScene extends CtrlAction {

	public CtrlActionOpenBlankScene(IBaseItem caller) {
		super(caller);
	}

	@Override
	public void run() {
		try {
			IFormScene formScene = (IFormScene) FormUtilities.fireNewWindowEvent(WindowType.SCENE);
			// 未选择场景则新建一个空白场景，参数为空字符串
			formScene.openScene("");
			Application.getActiveApplication().getOutput().output(DevelopProperties.getString("String_CreateBlankSceneSucceed"));
		} catch (Exception e) {
			Application.getActiveApplication().getOutput().output(e);
		}

	}
}
